#ifndef _OSGIS_DATA_CONFIG_H_
#define _OSGIS_DATA_CONFIG_H_
#include <string>

#include <lua>
#include <luaTinker>
#include "config.h"

class DataConfig
{
private:
	DataConfig();
public:
	virtual ~DataConfig();
	static DataConfig* getInstance();
public:
	char* getStringProperty(const char* key) const;
	int   getIntProperty(const char* key);
	template<typename T>
	T     getProperty(const char* key) const
	{
		return lua_tinker::get<T>(_lua, key);
	}
private:
	static DataConfig* _dataConfig;
	lua_State* _lua;
};

#endif